//
//  XLJDTableViewCell.m
//  XiangLove
//
//  Created by feng song on 2017/12/28.
//  Copyright © 2017年 BAOMIHUA.COM. All rights reserved.
//

#import "XLJDTableViewCell.h"

@implementation XLJDTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self settingUI];
    }
    return self;
}

-(void)settingUI
{
    
    _paybg = [[UIView alloc] init];
    _paybg.layer.masksToBounds = YES;
    _paybg.layer.cornerRadius  = 10;
    [self.contentView addSubview:_paybg];
    [_paybg mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.contentView.mas_right).with.offset(0);
        make.centerY.mas_equalTo(self.contentView);
        make.size.mas_equalTo(CGSizeMake(54, 22));
        
    }];
    
    _paytitle = [[UILabel alloc] init];
    _paytitle.font = [UIFont systemFontOfSize:10];
    _paytitle.textColor = kWhiteColor;
    _paytitle.text = @"去购买";
    _paytitle.textAlignment = NSTextAlignmentCenter;
    [self.contentView addSubview:_paytitle];
    [_paytitle mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(_paybg.mas_left).offset(13);
        make.centerY.mas_equalTo(_paybg);
    }];
    
    _jdAcount = [[UILabel alloc] init];
    _jdAcount.font = [UIFont systemFontOfSize:14];
    _jdAcount.textColor = RGB_HEX(0xff5753);
    _jdAcount.textAlignment = NSTextAlignmentCenter;
    [self.contentView addSubview:_jdAcount];
    [_jdAcount mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(_paybg.mas_left).with.offset(-6);
        make.centerY.mas_equalTo(self.contentView);
   }];
    
   
    
    
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
